package com.yunwushanhe.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunwushanhe.bean.req.ArticleAddReq;
import com.yunwushanhe.bean.req.ArticlePageReq;
import com.yunwushanhe.bean.req.ArticleUpdateReq;
import com.yunwushanhe.bean.ret.ResponseResult;
import com.yunwushanhe.bean.vo.*;
import com.yunwushanhe.entity.Article;

import java.util.List;

/**
 * 文章表(Article)表服务接口
 *
 * @author makejava
 * @since 2023-08-04 12:38:07
 */
public interface ArticleService extends IService<Article> {

    ResponseResult<List<ArticleHotVO>> hotArticleList();

    ResponseResult<PageVO<List<ArticleVO>>> articleList(Integer pageNum,Integer pageSize,Long categoryId);

    ResponseResult<ArticleDetailVO> getArticleDetail(Long id);

    ResponseResult<Object> updateViewCount(Long id);

    ResponseResult<Object> addArticle(ArticleAddReq articleAddReq);

    ResponseResult<PageVO<List<ArticleAdminPageVO>>> listAllArticle(ArticlePageReq articlePageReq);

    ResponseResult<ArticleUpdateVO> getArticleById(Long id);

    ResponseResult<Object> updateArticleById(ArticleUpdateReq articleUpdateReq);

    ResponseResult<Object> deleteArticleById(String id);
}

